if (NOT BMALLOC_DIR)
    set(BMALLOC_DIR "${CMAKE_SOURCE_DIR}/Source/bmalloc")
endif ()
if (NOT WTF_DIR)
    set(WTF_DIR "${CMAKE_SOURCE_DIR}/Source/WTF")
endif ()
if (NOT PURC_DIR)
    set(PURC_DIR "${CMAKE_SOURCE_DIR}/Source/PurC")
endif ()
if (NOT CSSENG_DIR)
    set(CSSENG_DIR "${CMAKE_SOURCE_DIR}/Source/CSSEng")
endif ()
if (NOT DOMRULER_DIR)
    set(DOMRULER_DIR "${CMAKE_SOURCE_DIR}/Source/DOMRuler")
endif ()
if (NOT REMOTEFETCHER_DIR)
    set(REMOTEFETCHER_DIR "${CMAKE_SOURCE_DIR}/Source/RemoteFetcher")
endif ()
if (NOT THIRDPARTY_DIR)
    set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/Source/ThirdParty")
endif ()
if (NOT CODE_TOOLS_DIR)
    set(CODE_TOOLS_DIR "${CMAKE_SOURCE_DIR}/Source/CodeTools")
endif ()
if (NOT TOOLS_DIR)
    set(TOOLS_DIR "${CMAKE_SOURCE_DIR}/Tools")
endif ()

set(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
set(WTF_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WTF")
set(PurC_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/PurC")
set(CSSEng_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/CSSEng")
set(DOMRuler_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/DOMRuler")
set(RemoteFetcher_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/RemoteFetcher")
set(Messages_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/messages")
set(PurCTestRunner_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/PurCTestRunner")

set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)

set(bmalloc_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(WTF_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(PurC_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(CSSEng_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(DOMRuler_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(RemoteFetcher_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
